<?xml version="1.0" encoding="UTF-8"?>
<!-- 
/**
 * Copyright 2011 MaGdev
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *    * Redistributions of source code must retain the above copyright
 *      notice, this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above copyright
 *      notice, this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 *    * The names of the authors may not be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @package      Mashape API-Documentor
 * @author       Marco Graetsch <info@magdev.de>
 * @copyright    2011 Marco Graetsch.development
 * @license      http://opensource.org/licenses/bsd-license.php New BSD License
 * @link         https://code.google.com/p/apidocumentor/
 */
 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template name="pages">
		<article data-role="page" id="home" data-theme="d">
            <header data-role="header" data-position="fixed">
                <h1>
                    <xsl:value-of select="$title" />
                    <xsl:text> API</xsl:text>
                </h1>
                <xsl:call-template name="menu" />
            </header>
            <section data-role="content" data-theme="b">
                <xsl:call-template name="home" />
            </section>
            <xsl:call-template name="footer" />
        </article>

        <article data-role="page" id="objects" data-theme="d">
            <header data-role="header" data-position="fixed">
                <h1>
                    <xsl:value-of select="$title" />
                    <xsl:text> API | Objects</xsl:text>
                </h1>
                <xsl:call-template name="menu" />
            </header>
            <section data-role="content" data-theme="b">
                <xsl:call-template name="objects" />
            </section>
            <xsl:call-template name="footer" />
        </article>

        <article data-role="page" id="methods" data-theme="d">
            <header data-role="header" data-position="fixed">
                <h1>
                    <xsl:value-of select="$title" />
                    <xsl:text> API | Methods</xsl:text>
                </h1>
                <xsl:call-template name="menu" />
            </header>
            <section data-role="content" data-theme="b">
                <xsl:call-template name="methods" />
            </section>
            <xsl:call-template name="footer" />
        </article>
        
        <xsl:if test="$component!=''">
            <article data-role="page" id="howto" data-theme="d">
	            <header data-role="header" data-position="fixed">
	                <h1>
	                    <xsl:value-of select="$title" />
	                    <xsl:text> API | How-To</xsl:text>
	                </h1>
	                <xsl:call-template name="menu" />
	            </header>
	            <section data-role="content" data-theme="b">
	                <h2>Mashape-API How-To</h2>
	                <ol>
	                    <li>
	                        Explore the API on the 
			                <xsl:element name="a">
			                    <xsl:attribute name="href">
			                        <xsl:value-of select="$apiUrl" />
			                        <xsl:text>/console</xsl:text>
			                    </xsl:attribute>
			                    <xsl:attribute name="rel">external</xsl:attribute>
			                    <xsl:text>test console</xsl:text>
			                </xsl:element>
	                    </li>
	                    <li>
	                        Read the <a href="http://www.mashape.com/guide" rel="external">Getting started</a> Guide, available for
	                        <div>
	                            <a href="http://www.mashape.com/docs/consume/json" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">JSON</a>
	                            <a href="http://www.mashape.com/docs/consume/java" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">Java</a>
	                            <a href="http://www.mashape.com/docs/consume/ruby" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">Ruby</a>
	                            <a href="http://www.mashape.com/docs/consume/python" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">Python</a>
	                            <a href="http://www.mashape.com/docs/consume/php" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">PHP</a>
	                            <a href="http://www.mashape.com/docs/consume/objectivec" rel="external" data-role="button" data-inline="true" data-theme="b" data-icon="info">Objective-C</a>
	                        </div>
	                    </li>
	                    <li>
	                        Download the client library for your preferred language
	                        <div>
	                            <xsl:element name="a">
	                                <xsl:attribute name="href">
	                                    <xsl:text>http://www.mashape.com/apis/download-java-client?componentName=</xsl:text>
	                                    <xsl:value-of select="$component" />
	                                </xsl:attribute>
	                                <xsl:attribute name="rel">external</xsl:attribute>
	                                <xsl:attribute name="data-theme">b</xsl:attribute>
	                                <xsl:attribute name="data-icon">gear</xsl:attribute>
	                                <xsl:attribute name="data-role">button</xsl:attribute>
	                                <xsl:attribute name="data-inline">true</xsl:attribute>
	                                <xsl:text>Java</xsl:text>
	                            </xsl:element>
	                            <xsl:element name="a">
	                                <xsl:attribute name="href">
	                                    <xsl:text>http://www.mashape.com/apis/download-ruby-client?componentName=</xsl:text>
	                                    <xsl:value-of select="$component" />
	                                </xsl:attribute>
	                                <xsl:attribute name="rel">external</xsl:attribute>
	                                <xsl:attribute name="data-theme">b</xsl:attribute>
	                                <xsl:attribute name="data-icon">gear</xsl:attribute>
	                                <xsl:attribute name="data-role">button</xsl:attribute>
	                                <xsl:attribute name="data-inline">true</xsl:attribute>
	                                <xsl:text>Ruby</xsl:text>
	                            </xsl:element>
	                            <xsl:element name="a">
	                                <xsl:attribute name="href">
	                                    <xsl:text>http://www.mashape.com/apis/download-python-client?componentName=</xsl:text>
	                                    <xsl:value-of select="$component" />
	                                </xsl:attribute>
	                                <xsl:attribute name="rel">external</xsl:attribute>
	                                <xsl:attribute name="data-theme">b</xsl:attribute>
	                                <xsl:attribute name="data-icon">gear</xsl:attribute>
	                                <xsl:attribute name="data-role">button</xsl:attribute>
	                                <xsl:attribute name="data-inline">true</xsl:attribute>
	                                <xsl:text>Python</xsl:text>
	                            </xsl:element>
		                        <xsl:element name="a">
	                                <xsl:attribute name="href">
	                                    <xsl:text>http://www.mashape.com/apis/download-php-client?componentName=</xsl:text>
		                                <xsl:value-of select="$component" />
		                            </xsl:attribute>
		                            <xsl:attribute name="rel">external</xsl:attribute>
		                            <xsl:attribute name="data-theme">b</xsl:attribute>
		                            <xsl:attribute name="data-icon">gear</xsl:attribute>
	                                <xsl:attribute name="data-role">button</xsl:attribute>
	                                <xsl:attribute name="data-inline">true</xsl:attribute>
		                            <xsl:text>PHP</xsl:text>
		                        </xsl:element>
	                            <xsl:element name="a">
	                                <xsl:attribute name="href">
	                                    <xsl:text>http://www.mashape.com/apis/download-objectivec-client?componentName=</xsl:text>
	                                    <xsl:value-of select="$component" />
	                                </xsl:attribute>
	                                <xsl:attribute name="rel">external</xsl:attribute>
	                                <xsl:attribute name="data-theme">b</xsl:attribute>
	                                <xsl:attribute name="data-icon">gear</xsl:attribute>
	                                <xsl:attribute name="data-role">button</xsl:attribute>
	                                <xsl:attribute name="data-inline">true</xsl:attribute>
	                                <xsl:text>Objective-C</xsl:text>
	                            </xsl:element>
	                         </div>
	                    </li>
	                    <li>Open the included sample, configure your <a href="http://www.mashape.com/account/settings/" rel="external">Developer-Key</a> and see how it works</li>
	                    <li><strong><em>Start hacking</em></strong></li>
	                </ol>
	            </section>
	            <xsl:call-template name="footer" />
	        </article>
	    </xsl:if>
	</xsl:template>
</xsl:stylesheet>